Skip to content

Feature/cspl 3775 extract common code in tests#1788

Draft
kasiakoziol wants to merge 22 commits intofeature/test-refactoringfrom
feature/CSPL-3775-extract-common-code-in-tests
Draft

Feature/cspl 3775 extract common code in tests#1788
kasiakoziol wants to merge 22 commits intofeature/test-refactoringfrom
feature/CSPL-3775-extract-common-code-in-tests

Conversation

@kasiakoziol
Copy link
Copy Markdown
Collaborator

@kasiakoziol kasiakoziol commented Mar 20, 2026

Description

It extracts common code under test/ to remove duplicates and enhance test readability and usability.

Key Changes

  • Consolidate duplicate V3 (master) and V4 (manager) test files into shared _shared.go + _test.go pairs with table-driven version configs
  • Delete ~30 redundant per-variant files (~5000 lines removed)
  • Add reusable version-aware deploy and verify helpers to the shared test utilities
  • Add watch-based verification utilities for faster and more reliable phase checks
  • Extract repeated multi-line verification patterns into shared helper functions
  • Inline single-use helpers and replace inline closures with reusable typed methods
  • Remove redundant guard clauses, double-verification calls, and dead code
  • Simplify variable declarations and replace hardcoded strings with constants
  • Fix naming conventions, add missing godoc, and standardize comments
  • Adopt shared helpers across appframework tests to reduce inline boilerplate

Testing and Verification

Automated tests

Related Issues

Jira: https://splunk.atlassian.net/browse/CSPL-4515

PR Checklist

  • Code changes adhere to the project's coding standards.
  • Relevant unit and integration tests are included.
  • Documentation has been updated accordingly.
  • All tests pass locally.
  • The PR description follows the project's guidelines.

…nts, removing duplicate helpers, replacing inline logic with shared utilities
…ode, and standardize naming, godoc comments, and constants for consistency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant